import request from "@/utils/request";

export const getToken = (params: any) => {
  return request({
    url: "auth/oauth/token",
    method: "post",
    data: params,
    headers: {
      isToken: false,
      "TENANT-ID": "1",
      Authorization: "Basic dGVzdDp0ZXN0",
    },
  });
};

// 获取地图数据
export const getPersonHouseMiddle = (params: any) => {
  return request({
    url: "/screen/personHouse/personHouseMiddle",
    method: "post",
    data: params,
  });
};

// 个人拥有房屋数量统计
export const getPersonHouseNumber = (params: any) => {
  return request({
    url: "/screen/personHouse/personHouseNumber",
    method: "post",
    data: params,
  });
};

// 个人住房面积走势分析
export const getPersonHouseArea = (params: any) => {
  return request({
    url: "/screen/personHouse/personHouseArea",
    method: "post",
    data: params,
  });
};

// 个人拥有住房购房资金来源及贷款趋势
export const getPersonHouseFundStatistics = (params: any) => {
  return request({
    url: "/screen/personHouse/personHouseFundStatistics",
    method: "post",
    data: params,
  });
};

// 个人拥有住房属性占比及趋势
export const getPersonHousePropertyStatistics = (params: any) => {
  return request({
    url: "/screen/personHouse/personHousePropertyStatistics",
    method: "post",
    data: params,
  });
};

// 个人拥有住房增长趋势-个人拥有住房数量和同比增长率统计
export const getPersonHouseStatistics = (params: any) => {
  return request({
    url: "/screen/personHouse/personHouseStatistics",
    method: "post",
    data: params,
  });
};

// 个人拥有住房增长趋势-个人拥有住房户型和面积分类统计
export const getPersonHouseTypeStatistics = (params: any) => {
  return request({
    url: "/screen/personHouse/personHouseTypeStatistics",
    method: "post",
    data: params,
  });
};

// 个人住房供应与交易趋势
export const getPersonHouseSupply = (params: any) => {
  return request({
    url: "/screen/personHouse/personHouseSupply",
    method: "post",
    data: params,
  });
};

// 常住人口对个人住房的影响
export const getPersonHousePopulation = (params: any) => {
  return request({
    url: "/screen/personHouse/personHousePopulation",
    method: "post",
    data: params,
  });
};

//  商品房总量变化分析
export const getPersonHouseCommodity = (params: any) => {
  return request({
    url: "/screen/personHouse/personHouseCommodity",
    method: "post",
    data: params,
  });
};

// 新-个人拥有住房属性占比及趋势
export const getPersonHouseGetHousingTrend = (params: any) => {
  return request({
    url: "/screen/personHouse/getHousingTrend",
    method: "post",
    data: params,
  });
};

// 新-个人拥有住房购房资金来源及贷款趋势-左侧
export const getPersonHouseFundLoanTrend = (params: any) => {
  return request({
    url: "/screen/personHouse/fundLoanTrend",
    method: "post",
    data: params,
  });
};

// 新-个人拥有住房购房资金来源及贷款趋势-右侧
export const getPersonHouseFundLoanTrendRight = (params: any) => {
  return request({
    url: "/screen/personHouse/fundLoanTrendRight",
    method: "post",
    data: params,
  });
};

// 新-个人拥有房屋情况统计
export const getPersonHouseGetIndividualProperty = (params: any) => {
  return request({
    url: "/screen/personHouse/getIndividualProperty",
    method: "post",
    data: params,
  });
};

// 新-个人住房供应与交易趋势左图
export const getPersonHouseHomeFlowLeft = (params: any) => {
  return request({
    url: "/screen/personHouse/homeFlowLeft",
    method: "post",
    data: params,
  });
};

// 新-个人住房供应与交易趋势右图
export const getPersonHouseHomeFlowRight = (params: any) => {
  return request({
    url: "/screen/personHouse/homeFlowRight",
    method: "post",
    data: params,
  });
};

// 新-购房人购房情况统计
export const getPersonHouseLogPurchaseStats = (params: any) => {
  return request({
    url: "/screen/personHouse/logPurchaseStats",
    method: "post",
    data: params,
  });
};

// 新-个人拥有住房增长趋势
export const getPersonHouseTrackHousingGrowth = (params: any) => {
  return request({
    url: "/screen/personHouse/trackHousingGrowth",
    method: "post",
    data: params,
  });
};
